package com.appwoo.txtws.service;

import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.content.pm.ActivityInfo;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.ResolveInfo;
import android.graphics.drawable.Drawable;
import android.util.Xml;
import com.appwoo.android.exception.NotFoundNetWorkException;
import com.appwoo.android.exception.TimeOutException;
import com.appwoo.android.util.PullIO;
import com.appwoo.txtws.activity.MainActivity;
import com.appwoo.txtws.bean.AutoSoftInfo;
import com.appwoo.txtws.bean.StateBean;
import com.appwoo.txtws.component.DBHelper;
import com.appwoo.txtws.component.FilterSoft;
import com.appwoo.txtws.component.Global;
import com.appwoo.txtws.component.Logger;
import com.appwoo.txtws.component.RqSP;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;

public class AuthSoftsServer
{
  private String childID;
  private Context context;
  private DBHelper dbhelper;
  private List<ApplicationInfo> mAllApps;
  private Map<Integer, Object> params;
  private Map<String, Integer> paramsClass;
  private PackageManager pm;
  private RqSP rqsp = new RqSP();

  public AuthSoftsServer(Context paramContext)
  {
    this.context = paramContext;
    this.childID = this.rqsp.getChildId(paramContext);
    this.pm = paramContext.getPackageManager();
    this.dbhelper = new DBHelper(paramContext);
  }

  private AutoSoftInfo getAppInfo(ResolveInfo paramResolveInfo)
  {
    AutoSoftInfo localAutoSoftInfo = new AutoSoftInfo();
    localAutoSoftInfo.setAsname(paramResolveInfo.loadLabel(this.pm).toString().trim());
    Drawable localDrawable = paramResolveInfo.loadIcon(this.pm);
    localAutoSoftInfo.setAdicon(saveLogo(localDrawable, paramResolveInfo.activityInfo.packageName));
    localAutoSoftInfo.setAdicon("");
    localAutoSoftInfo.setUpload_icon(localDrawable);
    localAutoSoftInfo.setAspkg(paramResolveInfo.activityInfo.packageName);
    localAutoSoftInfo.setAddownloadurl("");
    localAutoSoftInfo.setIsRecd(1);
    localAutoSoftInfo.setIsDel(0);
    localAutoSoftInfo.setAsIsFolder(0);
    if (this.paramsClass.containsKey(localAutoSoftInfo.getAspkg()))
      localAutoSoftInfo.setAsParentid(((Integer)this.paramsClass.get(localAutoSoftInfo.getAspkg())).intValue());
    while (true)
    {
      localAutoSoftInfo.setAsIsUpload(0);
      localAutoSoftInfo.setAsIsUploadImg(1);
      localAutoSoftInfo.setAsFolderName("");
      localAutoSoftInfo.setAsIsNew(0);
      localAutoSoftInfo.setAsIsChanged(0);
      localAutoSoftInfo.setActivityName(paramResolveInfo.activityInfo.name);
      System.out.println("rif.activityInfo.name----" + localAutoSoftInfo.getAsname() + "--------" + paramResolveInfo.activityInfo.name);
      return localAutoSoftInfo;
      localAutoSoftInfo.setAsParentid(0);
    }
  }

  private ArrayList<AutoSoftInfo> getAppList()
  {
    this.params = FilterSoft.setList();
    this.paramsClass = FilterSoft.getClassList();
    ArrayList localArrayList = new ArrayList();
    while (true)
    {
      int i;
      int j;
      try
      {
        Intent localIntent1 = new Intent("android.intent.action.MAIN", null);
        localIntent1.addCategory("android.intent.category.LAUNCHER");
        localIntent1.addCategory("android.intent.category.HOME");
        localIntent1.addCategory("android.intent.category.DEFAULT");
        List localList1 = this.context.getPackageManager().queryIntentActivities(localIntent1, 0);
        Intent localIntent2 = new Intent("android.intent.action.MAIN", null);
        localIntent2.addCategory("android.intent.category.LAUNCHER");
        List localList2 = this.context.getPackageManager().queryIntentActivities(localIntent2, 0);
        Boolean.valueOf(false);
        i = 0;
        if (i >= localList2.size())
          return localArrayList;
        Logger.i("app1", "name:" + ((ResolveInfo)localList2.get(i)).loadLabel(this.pm));
        Boolean localBoolean = Boolean.valueOf(false);
        j = 0;
        if (j >= localList1.size())
        {
          if (localBoolean.booleanValue())
            break label338;
        }
        else
        {
          if (!((ResolveInfo)localList2.get(i)).activityInfo.packageName.equals(((ResolveInfo)localList1.get(j)).activityInfo.packageName))
            break label344;
          localBoolean = Boolean.valueOf(true);
          continue;
        }
        if ((!this.params.containsValue(((ResolveInfo)localList2.get(i)).activityInfo.packageName)) && (!((ResolveInfo)localList2.get(i)).activityInfo.packageName.toLowerCase().contains("taskmanager")))
          localArrayList.add(getAppInfo((ResolveInfo)localList2.get(i)));
      }
      catch (Exception localException)
      {
        localException.printStackTrace();
        return localArrayList;
      }
      label338: i++;
      continue;
      label344: j++;
    }
  }

  private ArrayList<AutoSoftInfo> initAutoFolder()
  {
    ArrayList localArrayList = new ArrayList();
    String[] arrayOfString = { "互联网应用", "实用工具", "电信业务", "英语全项", "学习工具", "数理化大全", "词典查询", "赢在中高考", "同步教辅", "待审核", "应用市场" };
    for (int i = 0; ; i++)
    {
      if (i >= arrayOfString.length)
        return localArrayList;
      AutoSoftInfo localAutoSoftInfo = new AutoSoftInfo();
      localAutoSoftInfo.setAdicon("");
      localAutoSoftInfo.setAspkg(arrayOfString[i]);
      localAutoSoftInfo.setAddownloadurl("");
      localAutoSoftInfo.setIsRecd(1);
      localAutoSoftInfo.setIsDel(0);
      localAutoSoftInfo.setAsIsFolder(1);
      localAutoSoftInfo.setAsFolderName(arrayOfString[i]);
      localAutoSoftInfo.setAsParentid(0);
      localAutoSoftInfo.setAsIsUpload(0);
      localAutoSoftInfo.setAsIsUploadImg(0);
      localAutoSoftInfo.setAsname(arrayOfString[i]);
      localAutoSoftInfo.setActivityName("");
      localAutoSoftInfo.setAsIsNew(0);
      localAutoSoftInfo.setAsIsChanged(0);
      localArrayList.add(0, localAutoSoftInfo);
    }
  }

  private void pullXmlInstall(Context paramContext, String paramString)
    throws IOException, XmlPullParserException
  {
    Object localObject = Xml.newPullParser();
    int i;
    try
    {
      XmlPullParser localXmlPullParser = PullIO.getPullByString(paramString);
      localObject = localXmlPullParser;
      i = ((XmlPullParser)localObject).getEventType();
      if (i == 1)
        return;
    }
    catch (NullPointerException localNullPointerException)
    {
      while (true)
        localNullPointerException.printStackTrace();
      switch (i)
      {
      default:
      case 2:
      }
    }
    while (true)
    {
      i = ((XmlPullParser)localObject).next();
      break;
      if (((XmlPullParser)localObject).getName().equalsIgnoreCase("Nums"))
      {
        int j = Integer.valueOf(((XmlPullParser)localObject).nextText()).intValue();
        if (j != MainActivity.intMarketRecdCount)
        {
          MainActivity.intMarketRecdCount = j;
          paramContext.sendBroadcast(new Intent("refreshMarket"));
        }
      }
    }
  }

  // ERROR //
  private String saveLogo(Drawable paramDrawable, String paramString)
  {
    // Byte code:
    //   0: invokestatic 377	com/appwoo/txtws/component/Global:isSDCard	()Z
    //   3: ifeq +92 -> 95
    //   6: getstatic 380	com/appwoo/txtws/component/Global:IMGPATH	Ljava/lang/String;
    //   9: astore_3
    //   10: new 175	java/lang/StringBuilder
    //   13: dup
    //   14: aload_3
    //   15: invokestatic 383	java/lang/String:valueOf	(Ljava/lang/Object;)Ljava/lang/String;
    //   18: invokespecial 179	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
    //   21: aload_2
    //   22: invokevirtual 186	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   25: invokevirtual 189	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   28: astore 4
    //   30: aload_1
    //   31: checkcast 385	android/graphics/drawable/BitmapDrawable
    //   34: invokevirtual 389	android/graphics/drawable/BitmapDrawable:getBitmap	()Landroid/graphics/Bitmap;
    //   37: astore 5
    //   39: new 391	java/io/ByteArrayOutputStream
    //   42: dup
    //   43: invokespecial 392	java/io/ByteArrayOutputStream:<init>	()V
    //   46: astore 6
    //   48: aload 5
    //   50: getstatic 398	android/graphics/Bitmap$CompressFormat:PNG	Landroid/graphics/Bitmap$CompressFormat;
    //   53: bipush 100
    //   55: aload 6
    //   57: invokevirtual 404	android/graphics/Bitmap:compress	(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z
    //   60: pop
    //   61: aload 6
    //   63: invokevirtual 407	java/io/ByteArrayOutputStream:flush	()V
    //   66: aload 6
    //   68: invokevirtual 410	java/io/ByteArrayOutputStream:close	()V
    //   71: new 412	java/io/FileOutputStream
    //   74: dup
    //   75: aload 4
    //   77: invokespecial 413	java/io/FileOutputStream:<init>	(Ljava/lang/String;)V
    //   80: astore 9
    //   82: aload 9
    //   84: aload 6
    //   86: invokevirtual 417	java/io/ByteArrayOutputStream:toByteArray	()[B
    //   89: invokevirtual 421	java/io/FileOutputStream:write	([B)V
    //   92: aload 4
    //   94: areturn
    //   95: getstatic 424	com/appwoo/txtws/component/Global:IMGPATHMEMORY	Ljava/lang/String;
    //   98: astore_3
    //   99: goto -89 -> 10
    //   102: astore 8
    //   104: aload 8
    //   106: invokevirtual 425	java/io/IOException:printStackTrace	()V
    //   109: goto -38 -> 71
    //   112: astore 10
    //   114: aload 10
    //   116: invokevirtual 425	java/io/IOException:printStackTrace	()V
    //   119: aload 4
    //   121: areturn
    //   122: astore 10
    //   124: goto -10 -> 114
    //
    // Exception table:
    //   from	to	target	type
    //   61	71	102	java/io/IOException
    //   71	82	112	java/io/IOException
    //   82	92	122	java/io/IOException
  }

  private long uploadFirstSoft()
  {
    ArrayList localArrayList = this.dbhelper.getSoftUploadFirst(1, 0, 0, -1);
    SendSoftIcon(localArrayList, this.context);
    try
    {
      Logger.i("zhy", "上传数据：" + localArrayList.size() + "条");
      StateBean localStateBean2 = SendSourceToWeb(localArrayList, 0, 1);
      localStateBean1 = localStateBean2;
      if ((localStateBean1 != null) && ("0".equals(localStateBean1.getCode())))
        return 1L;
    }
    catch (IOException localIOException)
    {
      while (true)
      {
        localIOException.printStackTrace();
        localStateBean1 = null;
      }
    }
    catch (XmlPullParserException localXmlPullParserException)
    {
      while (true)
      {
        localXmlPullParserException.printStackTrace();
        localStateBean1 = null;
      }
    }
    catch (TimeOutException localTimeOutException)
    {
      while (true)
      {
        localTimeOutException.printStackTrace();
        localStateBean1 = null;
      }
    }
    catch (NotFoundNetWorkException localNotFoundNetWorkException)
    {
      StateBean localStateBean1;
      while (true)
      {
        localNotFoundNetWorkException.printStackTrace();
        localStateBean1 = null;
      }
      if ((localStateBean1 != null) && (localStateBean1.getDesc() != null))
        Logger.i("zhy", localStateBean1.getDesc());
    }
    return -1L;
  }

  private Boolean uploadSoft()
  {
    Boolean localBoolean = Boolean.valueOf(true);
    ArrayList localArrayList = this.dbhelper.getSoftUpload();
    Logger.i("zhy", "待上传软件：" + localArrayList.size());
    if ((localArrayList != null) && (localArrayList.size() > 0));
    try
    {
      StateBean localStateBean2 = SendSourceToWeb(localArrayList, 0, 0);
      localStateBean1 = localStateBean2;
      if ((localStateBean1 != null) && (localStateBean1.getCode() != null) && (localStateBean1.getCode().equals("0")))
      {
        localBoolean = Boolean.valueOf(true);
        Logger.i("zhy", "上传成功，开始修改本地上传标识");
        this.dbhelper.updateAuthSofts(localArrayList);
        Logger.i("zhy", "上传成功，修改本地上传标识完成");
        SendSoftIcon(this.dbhelper.getSoftUploadImg(), this.context);
        return localBoolean;
      }
    }
    catch (IOException localIOException)
    {
      while (true)
      {
        localIOException.printStackTrace();
        localStateBean1 = null;
      }
    }
    catch (XmlPullParserException localXmlPullParserException)
    {
      while (true)
      {
        localXmlPullParserException.printStackTrace();
        localStateBean1 = null;
      }
    }
    catch (TimeOutException localTimeOutException)
    {
      while (true)
      {
        localTimeOutException.printStackTrace();
        localStateBean1 = null;
      }
    }
    catch (NotFoundNetWorkException localNotFoundNetWorkException)
    {
      while (true)
      {
        localNotFoundNetWorkException.printStackTrace();
        StateBean localStateBean1 = null;
        continue;
        localBoolean = Boolean.valueOf(false);
        Logger.i("zhy", "上传失败");
      }
    }
  }

  public void AddSoftInfo(String paramString)
  {
    while (true)
    {
      Intent localIntent1;
      AutoSoftInfo localAutoSoftInfo;
      try
      {
        if ("com.appwoo.txtws.activity".equals(paramString))
          break;
        if ("com.txtw.daemon".equals(paramString))
          return;
        int i = this.dbhelper.checkExistsSoftsMarket(paramString);
        PackageInfo localPackageInfo = this.context.getPackageManager().getPackageInfo(paramString, 1);
        localIntent1 = this.context.getPackageManager().getLaunchIntentForPackage(paramString);
        ArrayList localArrayList = new ArrayList();
        localAutoSoftInfo = new AutoSoftInfo();
        this.rqsp.getLeavel(this.context);
        String str = localPackageInfo.applicationInfo.loadLabel(this.context.getPackageManager()).toString();
        localAutoSoftInfo.setAsname(str);
        Drawable localDrawable = localPackageInfo.applicationInfo.loadIcon(this.pm);
        localAutoSoftInfo.setAspkg(paramString);
        localAutoSoftInfo.setAsIsNew(1);
        if ((localPackageInfo.activities == null) || (localPackageInfo.activities.length == 0))
        {
          localAutoSoftInfo.setActivityName("");
          localAutoSoftInfo.setAddownloadurl("");
          if (i < 0)
            break label346;
          localAutoSoftInfo.setIsRecd(1);
          localAutoSoftInfo.setAsParentid(i);
          localAutoSoftInfo.setAdicon(saveLogo(localDrawable, paramString));
          localAutoSoftInfo.setIsDel(0);
          localAutoSoftInfo.setAsIsUpload(1);
          localAutoSoftInfo.setAsIsUploadImg(1);
          localArrayList.add(localAutoSoftInfo);
          Logger.i("zhy", "软件：" + str + ",来自软件市场：" + i + "isrecd=" + localAutoSoftInfo.getIsRecd());
          if ((this.dbhelper.insertAuthSofts(localArrayList) <= 0L) || (i < 0))
            break;
          Logger.i("zhydownload", "安装软件发送广播");
          Intent localIntent2 = new Intent("refreshData");
          this.context.sendBroadcast(localIntent2);
          return;
        }
      }
      catch (Exception localException)
      {
        localException.printStackTrace();
        return;
      }
      localAutoSoftInfo.setActivityName(localIntent1.getComponent().getClassName());
      continue;
      label346: localAutoSoftInfo.setAsParentid(0);
      localAutoSoftInfo.setIsRecd(this.dbhelper.getAPKRecd(paramString));
    }
  }

  public void SendSoftIcon(ArrayList<AutoSoftInfo> paramArrayList, Context paramContext)
  {
    PackageManager localPackageManager;
    int i;
    if ((paramArrayList != null) && (paramArrayList.size() > 0))
    {
      localPackageManager = paramContext.getPackageManager();
      i = 0;
    }
    while (true)
    {
      if (i >= paramArrayList.size())
        return;
      try
      {
        ApplicationInfo localApplicationInfo = localPackageManager.getApplicationInfo(((AutoSoftInfo)paramArrayList.get(i)).getAspkg(), 8192);
        boolean bool = new FileService().uploadIcon(localApplicationInfo.loadIcon(localPackageManager), ((AutoSoftInfo)paramArrayList.get(i)).getAspkg() + ".png", this.childID);
        Logger.i("sendsofticon", ((AutoSoftInfo)paramArrayList.get(i)).getAsname() + ":" + bool);
        DBHelper localDBHelper = this.dbhelper;
        String str = ((AutoSoftInfo)paramArrayList.get(i)).getAspkg();
        if (bool);
        for (int j = 0; ; j = 1)
        {
          localDBHelper.updateSoftsImg(str, j);
          i++;
          break;
        }
      }
      catch (PackageManager.NameNotFoundException localNameNotFoundException)
      {
        while (true)
          localNameNotFoundException.printStackTrace();
      }
    }
  }

  public StateBean SendSourceToWeb(ArrayList<AutoSoftInfo> paramArrayList, int paramInt1, int paramInt2)
    throws IOException, XmlPullParserException, TimeOutException, NotFoundNetWorkException
  {
    String str1 = "";
    StateBean localStateBean = new StateBean();
    XmlPullParser localXmlPullParser;
    int j;
    for (int i = 0; ; i++)
    {
      if (i >= paramArrayList.size())
      {
        String str2 = "<MSG><HEAD><SNDR>" + this.childID + "</SNDR>" + " <TYPE>ADSoftInstalled</TYPE>" + "</HEAD>" + "<BODY><BID>" + Global.getIMEI(this.context) + "</BID>" + "<Flag>" + paramInt2 + "</Flag>" + str1 + "</BODY>" + "</MSG>";
        MsgService localMsgService = new MsgService();
        Logger.v("zhyupload", "msg+=" + str2);
        String str3 = localMsgService.sendMessage(this.childID, str2, this.context);
        Logger.v("zhyupload", "resultMSG+=" + str3);
        localXmlPullParser = PullIO.getPullByString(str3);
        j = localXmlPullParser.getEventType();
        if (j != 1)
          break;
        return localStateBean;
      }
      str1 = str1 + "<List><ProcName>" + ((AutoSoftInfo)paramArrayList.get(i)).getAspkg() + "</ProcName>" + "<SoftName>" + ((AutoSoftInfo)paramArrayList.get(i)).getAsname() + "</SoftName>" + "<InstalledTime>" + ((AutoSoftInfo)paramArrayList.get(i)).getInstallTime() + "</InstalledTime>" + "<SoftIcon>" + ((AutoSoftInfo)paramArrayList.get(i)).getAspkg() + ".png</SoftIcon>" + "<IsDel>" + ((AutoSoftInfo)paramArrayList.get(i)).getIsDel() + "</IsDel>" + "<GrantFlag>" + ((AutoSoftInfo)paramArrayList.get(i)).getIsRecd() + "</GrantFlag>" + "<IsDown>" + paramInt1 + "</IsDown>" + "<IsSys>0</IsSys></List>";
    }
    switch (j)
    {
    case 1:
    default:
    case 0:
    case 2:
    }
    while (true)
    {
      j = localXmlPullParser.next();
      break;
      localStateBean = new StateBean();
      continue;
      if (localXmlPullParser.getName().equalsIgnoreCase("Code"))
        localStateBean.setCode(localXmlPullParser.nextText());
      else if (localXmlPullParser.getName().equalsIgnoreCase("Desc"))
        localStateBean.setDesc(localXmlPullParser.nextText());
    }
  }

  public void checkSoft1()
  {
    if ((this.childID == null) || (this.childID.length() == 0));
    SharedPreferences localSharedPreferences;
    String str2;
    do
    {
      int i;
      do
      {
        return;
        localSharedPreferences = this.context.getSharedPreferences("sys", 0);
        i = localSharedPreferences.getInt("isfirst", -1);
        if (i == 1)
        {
          Logger.i("zhy", "首次上传软件");
          if (uploadFirstSoft() < 0L)
          {
            Logger.i("zhy", "首次上传失败");
            return;
          }
          SharedPreferences.Editor localEditor2 = localSharedPreferences.edit();
          localEditor2.putInt("isfirst", 0);
          localEditor2.putString("nextdownloadtime", "1900-01-01 00:00:00");
          localEditor2.commit();
          return;
        }
      }
      while ((i != 0) || (!uploadSoft().booleanValue()));
      Logger.i("zhy", "111111");
      String str1 = localSharedPreferences.getString("nextdownloadtime", "1900-01-01 00:00:00");
      Logger.i("zhy", "提交的时间" + str1);
      str2 = downloadSoft(str1);
      Logger.i("zhy", "下载的时间" + str2);
    }
    while ((str2 == null) || (str2.length() <= 0));
    SharedPreferences.Editor localEditor1 = localSharedPreferences.edit();
    localEditor1.putString("nextdownloadtime", str2);
    localEditor1.commit();
  }

  public void delSoftInfo(String paramString)
  {
    if (("com.appwoo.txtws.activity".equals(paramString)) || ("com.txtw.daemon".equals(paramString)))
      return;
    AutoSoftInfo localAutoSoftInfo = new AutoSoftInfo();
    localAutoSoftInfo.setAspkg(paramString);
    localAutoSoftInfo.setIsDel(1);
    localAutoSoftInfo.setAsIsUpload(1);
    if (this.dbhelper.updateAuthSoftsAfterUninstall(localAutoSoftInfo) > 0L)
    {
      Logger.i("zhydownload", "卸载软件发送广播");
      Intent localIntent = new Intent("refreshData");
      this.context.sendBroadcast(localIntent);
      return;
    }
    Logger.i("zhydownload", "卸载软件成功，更新数据库失败");
  }

  public String downloadSoft(String paramString)
  {
    SoftInstallServer localSoftInstallServer = new SoftInstallServer(this.context);
    new StateBean();
    StateBean localStateBean = localSoftInstallServer.getInstallSoft(1, 0, 1, 1000, "1900-01-01", this.childID, Global.getIMEI(this.context));
    ArrayList localArrayList = localStateBean.getListASi();
    if ((localArrayList == null) || (localArrayList.size() == 0))
      if (localArrayList == null)
        Logger.i("zhydownload", "下载数据 null");
    while (true)
    {
      return localStateBean.getNextSynTime();
      if (localArrayList.size() == 0)
      {
        Logger.i("zhydownload", "下载数据 0,下载时间：" + localStateBean.getNextSynTime());
        continue;
        Logger.i("zhydownload", "本次记录更新时间" + localStateBean.getNextSynTime() + "下载软件数：" + localArrayList.size());
        if (this.dbhelper.insertAuthSofts(localStateBean.getListASi()) > 0L)
        {
          Logger.i("zhydownload", "下载数据发送广播");
          Intent localIntent = new Intent("refreshData");
          this.context.sendBroadcast(localIntent);
        }
      }
    }
  }

  public void getNums()
  {
    String str1 = this.context.getSharedPreferences("sys", 0).getString("recddate", "1900-01-01 00:00:00");
    String str2 = "<MSG><HEAD><SNDR>" + this.childID + "</SNDR> " + "<TYPE>RQNums</TYPE></HEAD>" + "<BODY>" + "<BID>" + Global.getIMEI(this.context) + "</BID>" + "<DataTime>" + str1 + "</DataTime>" + "</BODY></MSG>";
    MsgService localMsgService = new MsgService();
    try
    {
      Logger.i("zhydownload", "提交命令成功：" + str2);
      String str3 = localMsgService.sendMessage(this.childID, str2, this.context);
      pullXmlInstall(this.context, str3);
      Logger.i("zhydownload", "返回值：" + str3);
      return;
    }
    catch (IOException localIOException)
    {
      Logger.i("zhydownload", "提交命令失败：" + str2);
      return;
    }
    catch (XmlPullParserException localXmlPullParserException)
    {
      localXmlPullParserException.printStackTrace();
      return;
    }
    catch (NotFoundNetWorkException localNotFoundNetWorkException)
    {
      localNotFoundNetWorkException.printStackTrace();
      return;
    }
    catch (TimeOutException localTimeOutException)
    {
    }
  }

  public long initFirstSoft()
  {
    ArrayList localArrayList = getAppList();
    localArrayList.addAll(0, initAutoFolder());
    return this.dbhelper.insertAuthSoftsFirst(localArrayList);
  }
}

/* Location:           C:\Documents and Settings\Administrator\classes_dex2jar.jar
 * Qualified Name:     com.appwoo.txtws.service.AuthSoftsServer
 * JD-Core Version:    0.6.2
 */